<form name="copyForm" class="form-horizontal" ng-init="dvm.init()" ng-submit="dvm.submit(copyForm.$valid)" novalidate>
  <div class="modal-header">
    <button type="button" class="close" ng-click="dvm.cancel()">&times;</button>
    <h4 class="modal-title">复制文件夹</h4>
  </div>
  <div class="modal-body">
    <div class="form-group">
      <label class="col-sm-2 control-label">源文件夹：</label>
      <div class="col-sm-10">
        <input type="text" name="source" class="form-control" ng-model="dvm.source" readonly>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">上级目录：</label>
      <div class="col-sm-10">
        <input type="text" name="directory" class="form-control" ng-model="dvm.directory" readonly required>
        <dirtree exclude="dvm.exclude" on-selected="dvm.select"></dirtree>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">文件夹名：</label>
      <div class="col-sm-10">
        <input type="text" name="target" class="form-control" ng-model="dvm.target" required autofocus
            pattern="^[^:\\*\\?&quot;&lt;&gt;\\|/]{1,255}$"
            ng-class="{'invalid': copyForm.$submitted && copyForm.target.$invalid}">
        <p class="text-danger" ng-show="copyForm.$submitted && copyForm.target.$error.required">文件夹名不能为空</p>
        <p class="text-danger" ng-show="copyForm.$submitted && copyForm.target.$error.pattern">文件夹名格式不正确</p>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-10 col-sm-offset-2">
        <label class="checkbox-inline">
          <input type="checkbox" value="true" ng-model="dvm.ignored"> 覆盖同名文件夹
        </label>
        <label class="checkbox-inline">
          <input type="checkbox" value="true" ng-model="dvm.movable"> 删除源文件夹
        </label>
      </div>
    </div>
  </div>
  <div class="modal-footer">
    <button type="submit" class="btn btn-default" ng-disabled="copyForm.$invalid">
      <i class="fa fa-copy"></i> 复制</button>
    <button type="button" class="btn btn-default" ng-click="dvm.cancel()">
      <i class="fa fa-times"></i> 取消</button>
  </div>
</form>
